 project(not-not-ok)
 cmake_minimum_required(VERSION 3.16)
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_C_STANDARD 99)

 add_compile_options(-std=c99 -Wall)
 add_compile_options(-Wno-padded -Wno-reserved-identifier -Wno-newline-eof -Wno-c11-extensions -Wno-gnu-zero-variadic-macro-arguments -Wno-static-in-inline -Wno-unknown-warning-option -Wno-double-promotion -Wno-declaration-after-statement -Wno-switch-enum -Wno-sign-conversion -Wno-implicit-int-conversion -Wno-implicit-float-conversion -Wno-unused-parameter -Wno-float-conversion -Wno-unused-function -Wno-unused-variable -Wno-missing-noreturn -Wno-strict-aliasing -Wno-unused-result -Wno-format)


 if (CMAKE_BUILD_TYPE AND (CMAKE_BUILD_TYPE STREQUAL "Debug"))
     add_compile_options(-g)
 else()
     add_compile_options(-Ofast)
 endIF ()

 IF (CMAKE_SYSTEM_NAME MATCHES "Generic")
     include_directories(USER)
     #Device
     include_directories(Libraries/sdk/)
     include_directories(Libraries/sdk/drivers)
     include_directories(Libraries/sdk/CMSIS/Include)
     #��ɿ
     include_directories(Libraries/zf_common/)
     include_directories(Libraries/zf_driver)
     #SCNS
     include_directories(Libraries/scnsBsp/MM32F5277_seekfree)
     include_directories(Libraries/scns/src)
     include_directories(Libraries/hxPrintf)

     #Device
     add_subdirectory(Libraries/sdk)
     #��ɿ
     add_subdirectory(Libraries/zf_driver)
     add_subdirectory(Libraries/zf_common)
     #SCNS
     add_subdirectory(Libraries/scnsBsp/MM32F5277_seekfree)
     add_subdirectory(Libraries/scns)
     add_subdirectory(Libraries/hxPrintf)

     add_subdirectory(USER/)
 else ()
     include_directories(VM)
     #SCNS
     include_directories(Libraries/scnsBsp/windows)
     include_directories(Libraries/scns/src)
     include_directories(Libraries/hxPrintf)
     #JCTO
     include_directories(Libraries/jcto)

     #SCNS
     add_subdirectory(Libraries/scnsBsp/windows)
     add_subdirectory(Libraries/scns)
     #JCTO
     add_subdirectory(Libraries/jcto)
     add_subdirectory(Libraries/hxPrintf)


     link_libraries(m)

     add_subdirectory(VM/)
 ENDIF ()